﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Framework.Orm.Attributes
{
    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property,
            AllowMultiple = false, Inherited = false)]
    public class ColumnAttribute : Attribute
    {
        /// <summary>
        /// 名字
        /// </summary>
        public string Name
        {
            get;
            set;
        }

        public bool Unique
        {
            get;
            set;
        }

        /// <summary>
        /// 是否可为空
        /// </summary>
        public bool Nullable
        {
            get;
            set;
        }

        /// <summary>
        /// 是否可新建
        /// </summary>
        public bool Insertable
        {
            get;
            set;
        }

        /// <summary>
        /// 是否可更新
        /// </summary>
        public bool Updatable
        {
            get;
            set;
        }
    }
}
